package com.itheima.Set.TreeSet;


import java.util.Collections;
import java.util.TreeSet;

public class MyTreeSet2 {
    public static void main(String[] args) {
        TreeSet<Student>trs=new TreeSet<>();
        Student s1=new Student("张三",23);
        Student s2=new Student("李四",23);
        Student s3=new Student("钱五",12);
        Student s4=new Student("赵六",44);
        Student s5=new Student("钱无",12);
        trs.add(s1);
        trs.add(s2);
        trs.add(s3);
        trs.add(s4);
        trs.add(s5);
        System.out.println(trs);
    }
}
